package com.demo.springboot;

import org.springframework.boot.SpringBootConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Profile;

@SpringBootConfiguration
public class MyConfig {

    @Bean
    public Runnable createRunnable() {
        System.out.println("-----------product---------");
        return () -> {};
    }

    @Bean
    @Profile("test")
    public Runnable createRunnable2() {
        System.out.println("-----------test---------");
        return () -> {};
    }

    @Bean
    @Profile("dev")
    public Runnable createRunnable3() {
        System.out.println("-----------dev---------");
        return () -> {};
    }
}
